package com.dx.financehy.modules.system.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.dx.financehy.base.CommonEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @author jinjin
 * @date 2020-09-25
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("sys_user")
public class User extends CommonEntity<User> implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "user_id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "用户类型：0:-admin（商家+留言管理员），1-admin（商家管理员），2-business（商家），3-tourist（游客）")
    private Integer userType;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "微信号")
    private String wxOpenId;

    @ApiModelProperty(value = "状态：1启用、0禁用")
    private Boolean enabled;

    @ApiModelProperty(value = "是否允许登录: 1允许，0不允许")
    private Boolean isLogin;

    @ApiModelProperty(value = "头像真实路径")
    private String avatarPath;

    @ApiModelProperty(value = "商家id")
    private String merchantId;

    @ApiModelProperty(value = "游客序号")
    private Integer visitorIndex;


    /**
     * 删除标志：0-正常，1-删除
     */
    @JsonIgnore
    @TableLogic
    @TableField(fill= FieldFill.INSERT)
    private Boolean deleted;

}
